<template>
    <div class="commentItem">
        <img class="avatar" src="@/assets/icons/avatar.svg"></img>
        <div class="body">
            <div class="name">{{ props.commmentInf.name }}</div>
            <div class="content">{{ props.commmentInf.content }}</div>
        </div>
    </div>
</template>

<script setup>
const props = defineProps({
    commmentInf: {
        type: Object,
        default: () => { }
    }
})

</script>
<style lang="scss" scoped>
.commentItem {
    width: 500px;
    display: flex;
    padding: 10px;

    .avatar {
        height: 30px;
        width: 30px;
        border-radius: 50%;
        background-color: #ccc;
        padding: 4px;
    }

    .body {
        width: 80%;
        margin-left: 10px;

        .name {
            width: 100%;
            font-size: 20px;
            font-weight: 600;

            &::after {
                content: '';
                display: block;
                width: 30%;
                height: 1px;
                background-color: #ccc;
            }
        }

        .content {
            width: 100%;
            font-size: 14px;
            font-weight: 400
        }

        .context {
            width: 100%;
        }
    }
}
</style>